CREATE PROCEDURE [dbo].[users_insert]
    @email nvarchar(256),
    @password binary(32),
    @salt binary(8),
    @login nvarchar(256),
    @registrationDate datetime2,
    @status tinyint
AS
INSERT INTO [dbo].[Users]
( 
    Email,
    Password,
    Salt,
    Login,
    RegistrationDate,
    Status)
VALUES(
    @email,
    @password,
    @salt,
    @login,
    @registrationDate,
    @status)
declare @userId int = @@IDENTITY

SELECT
    [UserId]
FROM Users
WHERE
    Users.[UserId]=@userId
RETURN 0
